//
//  KUserAuthenticationAddressCell.m
//  Keping
//
//  Created by Joanlove on 2017/12/21.
//  Copyright © 2017年 柯平. All rights reserved.
//

#import "KUserAuthenticationAddressCell.h"

@implementation KUserAuthenticationAddressCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)textViewDidEndEditing:(UITextView *)textView {
    if ([textView.text isNotBlank]) {
        if (self.textBlock) {
            self.textBlock(textView.text);
        }
    }
}

- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text {
    if ([text isEqualToString:@"\n"]) {
        [textView resignFirstResponder];
        return NO;
    }
    return YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
